local class = require("class")
local super = require("ex2lua")
local cjson = require("cjson")

---@class excel2jsonconfig
local this = class(super)

function this:ctor(param)
    super.ctor(self,param)
end 

---保存文件
---@param fpath string @文件路径
---@param data table @配置标识
---@param emmy string|nil @注解
---@param line boolean|nil @是否换行
function this:wirteUseCfg(fname, data, emmy)
    local fpath = self.writeDir .. fname .. self.wffix
    local f = io.open(fpath, "wb")
    if f then
        local str = cjson.encode(data)
        f:write(str)
        f:close()
    end
    print("write jsonCfg:", fpath)
end

return this